import request from '@/utils/request';

// 活动信息
/**
 * 获取遥控器二维码
 */
export const getControlQRcode = ({ splid }) => request.get(`/newHuoDongHm/getYkqUrl?splid=${splid}`);

// 游戏设置

// 活动数据

// 活动收入
// 企业信息设置
export const setCompanyLogo = (params) => {
  return request.post('/qiYeNe/saveQiyeInfo', params);
};
// 获取企业信息
export const getCompanyLogo = (params) => {
  return request.post('/qiYeNe/qiYeList', params);
};

// 添加签到语
export const addWish = (params) => {
  return request.post('/qianDaoYu/add', params);
};
// 获取签到语列表
export const getWishList = (params) => {
  return request.post('/qianDaoYu/list', params);
};
// 签到语开关设置
export const wishSwitch = (params) => {
  return request.post('/qianDaoYu/updateSwitch', params);
};
// 删除签到语
export const removeWish = (params) => {
  return request.post('/qianDaoYu/shanchu', params);
};

// 获取投票列表
export const voteList = (params) => {
  return request.post('/hmTouPiao/listTp', params);
};
// 删除投票选项
export const removeVote = (params) => {
  return request.post('/hmTouPiao/deleteTp', params);
};
// 添加投票信息
export const saveVote = (params) => {
  return request.post('/hmTouPiao/saveTp', params);
};
// 投票设置
export const editVote = (params) => {
  return request.post('/hmTouPiao/updateTpNumber', params);
};
// 强制输入手机号开关
export const phoneSwitch = (params) => {
  return request.post('/qianDaoYu/updatePhoneSwitch', params);
};

// 保存音乐
export const saveSong = (params) => {
  return request.post('/music/saveMusic', params);
};

// 编辑音乐
export const editSong = (params) => {
  return request.post('/music/editMusic', params);
};

// 获取音乐列表
export const getSongList = (params) => {
  return request.post('/music/getMusiclistPage', params);
};

// 获取音乐总开关
export const getUserConfig = () => request.post('/music/getUserConfig', {});

// 一键删除整个歌单，可按歌手删除
export const deleteAllMusic = ({ splid, singerId }) => {
  let url = `/music/deleteMusic?splid=${splid}`;
  if (singerId) {
    url += `&singerId=${singerId}`;
  }
  console.log(url);
  return request.get(url);
};

// 获取评分数据列表
export const getRemarkData = ({ splid, orderBy }) => request.post('/player/getPlayerInfoList', {
  splid,
  orderBy,
});
